Creating Subsystems / Commands
Creating a Subsystem
To create a new subsystem in VS Code with the WPILib extension:
-
Right-click on the
src/main/include/subsystems
folder in the file explorer. -
Select
WPILib: Create a new class/command
.
-
Choose
Subsystem
from the list.
-
Name the new subsystem
Drivetrain
.
-
You should see two folder now in one in
src/main/include/subsystems
calledDrivetrain.h
and the other insrc/main/cpp/subsystems
calledDrivetrain.cpp
Creating a Command
To create a new command in VS Code with the WPILib extension:
-
Right-click on the
src/main/include/commands
folder in the file explorer. -
Select
WPILib: Create a new class/command
.
-
Choose
Subsystem
from the list.
-
Name the new subsystem
LED_enable
.
-
You should see two folder now in one in
src/main/include/commands
calledLED_enable.h
and the other insrc/main/cpp/commands
calledLED_enable.cpp